home *** CD-ROM | disk | FTP | other *** search
- /*
- ** CTCPApplication.h
- **
- ** TurboTCP support library
- ** Application subclass
- **
- ** Copyright © 1993-94, FrostByte Design / Eric Scouten
- **
- */
-
- #pragma once
-
- #include "CApplication.h"
-
-
- /*______________________________________________________________________
- **
- ** CTCPApplication
- **
- ** This application subclass should be used in place of the standard CApplication. It hooks
- ** into the event loop to handle MacTCP events which were queued at interrupt time, and
- ** takes care of opening and closing the MacTCP driver at the appropriate times.
- **
- ** NOTE: It is highly recommended that you enable background processing by turning on
- ** the “Background Null Events” SIZE resource flag. See the Set Project Type… dialog
- ** under the Project menu.
- **
- ** By default, TurboTCP sets the maximum sleep time to 90 ticks (1.5 seconds). Feel free
- ** to modify this behavior. However, I recommend that you use a setting somewhat lower
- ** than TCL’s default of 600 ticks (10 seconds). You may wish to use a lower value for
- ** high-performance applications, or a higher value to be more MultiFinder-friendly.
- **
- */
-
- class CTCPApplication : public CApplication {
-
- TCL_DECLARE_CLASS;
-
- short maxTCPEvents; // maximum number of TCP events to process
- long maxTCPTicks; // maximum ticks to spend in TCP event loop
-
-
- // constructors
-
- public:
- CTCPApplication();
- CTCPApplication(short extraMasters, Size aRainyDayFund,
- Size aCriticalBalance, Size aToolboxBalance);
- void ITCPApplication(short extraMasters, Size aRainyDayFund, Size aCriticalBalance,
- Size aToolboxBalance);
-
- virtual void MakeHelpers();
-
-
- // application shutdown
-
- virtual Boolean Quit();
-
-
- // foreground/background event trapping
-
- virtual void Process1Event();
- };
-